<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>员工资料</title>
</head>
<body>
<style>
.input-information{
	height: 20px;
    width: 200px;
    border-radius: 2px;
    outline: none;
    border: solid 1px lightgray;
    font-size: 15px;
    color:gray;
}
.input-information:hover{
	border:solid 1px lightseagreen;
}
.shengpi{
		display: block;
    	color: #1AB394;
    	font-weight: 700;
	}
	.center-body{
		margin: 10px 0px;
	    min-height: 140px;
	    background-color: rgba(255,255,255,1);
	    box-sizing: border-box;
	    border-width: 1px;
	    border-style: solid;
	    border-color: rgba(229,230,231,1);
	    border-radius: 2px;
	    position: relative;
	    padding: 20px;
	}
	.center-shengpi{
		width: 60px;
	    height: 100px;
	    margin-right: 50px;
	    float: left;
	    position: relative;
	}
	.center-shengpi img{
		width: 60px;
    	height: 60px;
    	border-radius: 30px;
	}
	.text-center{
		width: 16px;
	    height: 16px;
	    text-align: center;
	    background-color: rgba(24,166,137,1);
	    position: absolute;
	    line-height: 20px;
	    right: 4px;
	    top: 45px;
	    border-radius: 50%;
	}
	.textsex{
		width: 16px;
	    height: 16px;
	    background-color: rgba(24,166,137,1);
	    position: absolute;
	    line-height: 20px;
	    right: 4px;
	    top: 65px;
	    border-radius: 50%;
	}
	.report-pic{
		padding-top: 10px;
	    font-size: 15px;
	    color: #666;
	}
	.pic{
		width: 80px;
	    height: 100px;
	    margin-right: 50px;
	    float: left;
	    position: relative;
	}
	.pic div{
		text-align: center;
	}
	.pic img{
		width: 80px;
	    height: 80px;
	    border-radius: 50%;
	    vertical-align: middle;
	}
</style>
	<div style="padding:10px;width:80%;margin:20px auto;box-shadow:1px 1px 1px lightgray;background:white;">
		<h4 class="geren" style="font-weight:normal;font-size:16px;" abbr="${ruzhi[0]['id']}">基本信息</h4><hr>
		<div style="padding:20px;">
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">姓名：</label><input class="input-information" value="${ruzhi[0]['name']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">证件类型：</label>
					<select class="input-information zhengjian" style="height:25px;margin-left: -3px;">
						<option style="display:none" value="${ruzhi[0]['zhengjian']==1?'身份证':'其他'}">${ruzhi[0]['zhengjian']==1?'身份证':'其他'}</option>
						<option  value="身份证">身份证</option>
						<option  value="其他">其他</option>
					</select>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label class="position_id" style="width:36%;text-align:center;display:inline-block;font-size:15px;" abbr="${ruzhi[0]['position_id']}">职位：</label><input class="input-information" value="${ruzhi[0]['position_name']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label class="Depart_id" style="width:36%;text-align:center;display:inline-block;font-size:15px;" abbr="${ruzhi[0]['Depart_id']}">部门：</label><input class="input-information" value="${ruzhi[0]['depart_name']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">手机号码：</label><input class="input-information phone" value="${ruzhi[0]['phone']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">证件号：</label><input class="input-information zhengjianhao" value="${ruzhi[0]['zhengjianhao']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">员工类型：</label>
					<select class="input-information staff_type" style="height:25px;margin-left: -3px;">
						<option style="display:none" value="${ruzhi[0]['staff_type']==1?'全职':''}
						${ruzhi[0]['staff_type']==2?'兼职':''}${ruzhi[0]['staff_type']==3?'实习':''}
						${ruzhi[0]['staff_type']==4?'退休返聘':''}${ruzhi[0]['staff_type']==5?'其他':''}">${ruzhi[0]['staff_type']==1?'全职':''}
						${ruzhi[0]['staff_type']==2?'兼职':''}${ruzhi[0]['staff_type']==3?'实习':''}
						${ruzhi[0]['staff_type']==4?'退休返聘':''}${ruzhi[0]['staff_type']==5?'其他':''}</option>
						<option  value="全职">全职</option>
						<option  value="兼职">兼职</option>
						<option  value="实习">实习</option>
						<option  value="退休返聘">退休返聘</option>
						<option  value="其他">其他</option>
					</select>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">入职日期：</label><input class="input-information dateentry" type="date" value="${ruzhi[0]['dateentry']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">合同类型：</label>
					<select class="input-information ht_type" style="height:25px;margin-left: -3px;">
						<option style="display:none" value="${ruzhi[0]['ht_type']==1?'劳动合同':''}${ruzhi[0]['ht_type']==2?'劳务合同':''}
						${ruzhi[0]['ht_type']==3?'实习合同':''}${ruzhi[0]['ht_type']==4?'无固定期限劳动合同':''}
						${ruzhi[0]['ht_type']==5?'其他合同':''}">${ruzhi[0]['ht_type']==1?'劳动合同':''}${ruzhi[0]['ht_type']==2?'劳务合同':''}
						${ruzhi[0]['ht_type']==3?'实习合同':''}${ruzhi[0]['ht_type']==4?'无固定期限劳动合同':''}
						${ruzhi[0]['ht_type']==5?'其他合同':''}</option>
						<option  value="劳动合同">劳动合同</option>
						<option  value="劳务合同">劳务合同</option>
						<option  value="实习合同">实习合同</option>
						<option  value="无固定期限劳动合同">无固定期限劳动合同</option>
						<option  value="其他合同">其他合同</option>
					</select>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="padding-left: 5px;width:36%;text-align:left;display:inline-block;border-left: solid 3px lightseagreen;font-size:15px;">合同信息：</label>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">当前合同起始日：</label><input class="input-information ht_start" type="date" value="${ruzhi[0]['ht_start']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">当前合同终止日：</label><input class="input-information ht_end" type="date" value="${ruzhi[0]['ht_end']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">试用期到期日：</label><input class="input-information ht_finish" type="date" value="${ruzhi[0]['ht_finish']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="padding-left: 5px;width:36%;text-align:left;display:inline-block;border-left: solid 3px lightseagreen;font-size:15px;">员工信息：</label>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">证件姓名：</label><input class="input-information name" value="${ruzhi[0]['name']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">性别：</label>
					<select class="input-information sex" style="height:25px;margin-left: -3px;">
						 
						<option style="display:none" value="${ruzhi[0]['sex']==1?'男':''}${ruzhi[0]['sex']==2?'女':''}">${ruzhi[0]['sex']==1?'男':''}${ruzhi[0]['sex']==2?'女':''}</option>
						<option  value="男">男</option>
						<option  value="女">女</option>
					</select>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">出生日期：</label><input class="input-information birthday" type="date" value="${ruzhi[0]['birthday']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">民族：</label><input class="input-information national" value="${ruzhi[0]['national']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">户口所在地：</label><input class="input-information idaddress" value="${ruzhi[0]['idaddress']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">居住地址：</label><input class="input-information localaddress" value="${ruzhi[0]['localaddress']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">政治面貌：</label>
					<select class="input-information political" style="height:25px;margin-left: -3px;">
						<option style="display:none" value="${ruzhi[0]['political']==1?'党员':''}${ruzhi[0]['political']==2?'预备党员':''}${ruzhi[0]['political']==3?'民主党派':''}${ruzhi[0]['political']==4?'团员':''}${ruzhi[0]['political']==5?'群众':''}${ruzhi[0]['political']==6?'其他':''}">${ruzhi[0]['political']==1?'党员':''}
						${ruzhi[0]['political']==2?'预备党员':''}${ruzhi[0]['political']==3?'民主党派':''}
						${ruzhi[0]['political']==4?'团员':''}${ruzhi[0]['political']==5?'群众':''}
						${ruzhi[0]['political']==6?'其他':''}</option>
						<option  value="党员">党员</option>
						<option  value="预备党员">预备党员</option>
						<option  value="民主党派">民主党派</option>
						<option  value="团员">团员</option>
						<option  value="群众">群众</option>
						<option  value="其他">其他</option>
					</select>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">最高学历：</label>
					<select class="input-information education" style="height:25px;margin-left: -3px;">
						<option style="display:none" value="${ruzhi[0]['education']}">${ruzhi[0]['education']}</option>
						<option  value="博士">博士</option>
						<option  value="硕士/MBA/EMBA">硕士/MBA/EMBA</option>
						<option  value="本科">本科</option>
						<option  value="大专/高职">大专/高职</option>
						<option  value="高中/中专/中技">高中/中专/中技</option>
						<option  value="初中">初中</option>
						<option  value="小学">小学</option>
						<option  value="其他">其他</option>
					</select>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">婚姻状况：</label>
					<select class="input-information marriage" style="height:25px;margin-left: -3px;">
						<option style="display:none" value="${ruzhi[0]['marriage']}">${ruzhi[0]['marriage']}</option>
						<option  value="已婚">已婚</option>
						<option  value="未婚">未婚</option>
					</select>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">紧急联系人姓名：</label><input class="input-information urgent" value="${ruzhi[0]['urgent']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">紧急联系人电话：</label><input class="input-information urgent_phone" value="${ruzhi[0]['urgent_phone']}"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">QQ：</label><input class="input-information qq" value="${ruzhi[0]['qq']}"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;">微信：</label><input class="input-information weixin" value="${ruzhi[0]['weixin']}"/>
				</div>
			</div>
			
			<div class="center">
					<span class="shengpi">审批人</span>
					<div class="center-body">
						<div class="pic">
							<img src="static/easyui/themes/icons/notui.jpg"/>
							<div class="textsex"></div>
							<div class="report-pic" abbr="${manager[0].staff_id}" ssb="${sid}">${manager[0].Staff_name }</div>
						</div>
					</div>
				</div>
			
			<div style="width:100%;height:40px;background:white;margin:30px auto;text-align:center;line-height:40px;">
				<input onClick="fanhui()" type="button" style="margin: 0 40px;padding: 4px 15px;font-size: 16px; background:#d9534f!important;border-radius: 3px;border: none;cursor: pointer;color: white;" value="返回"/>
				<input onClick="queding()" type="button" style="margin: 0 40px;padding: 4px 15px;font-size: 16px; background:rgb(25, 170, 141);border-radius: 3px;border: none;cursor: pointer;color: white;" value="提交"/>
			</div>
		</div>
		</div>
	  <script type="text/javascript">
	  	function fanhui(){
	  		$("#content-admin").panel('open').panel('refresh','hr-induction');
	  	}
	  	function queding(){
	  		var a=$(".zhengjian option:selected").val();
	  		if(a=="身份证"){
	  			var zhengjian=1;
	  		}else{
	  			var zhengjian=0;
	  		}
	  		var position_id=$(".position_id").attr("abbr");
	  		var Depart_id=$(".Depart_id").attr("abbr");
	  		var phone=$(".phone").val();
	  		var zhengjianhao=$(".zhengjianhao").val();
	  		var b=$(".staff_type option:selected").val();
	  		if(b=="全职"){
	  			var staff_type=1;
	  		}else if(b="兼职"){
	  			var staff_type=2;
	  		}else if(b=="实习"){
	  			var staff_type=3;
	  		}else if(b=="退休返聘"){
	  			var staff_type=4;
	  		}else if(b=="其他"){
	  			var staff_type=5;
	  		}else{
	  			var staff_type=0;
	  		}
	  		
	  		var dateentry=$(".dateentry").val();
	  		var c=$(".ht_type option:selected").val().trim();
	  		if(c=="劳动合同"){
	  			var ht_type=1;
	  		}else if(c=="劳务合同"){
	  			var ht_type=2;
	  		}else if(c=="实习合同"){
	  			var ht_type=3;
	  		}else if(c=="无固定期限劳动合同"){
	  			var ht_type=4;
	  		}else if(c=="其他合同"){
	  			var ht_type=5;
	  		}else{
	  			var ht_type=0;
	  		}
	  		
	  		var ht_start=$(".ht_start").val();
	  		var ht_end=$(".ht_end").val();
	  		var ht_finish=$(".ht_finish").val();
	  		var name=$(".name").val();
	  		var d=$(".sex option:selected").val();
	  		if(d=="男"){
	  			var sex=1;
	  		}else if(d=="女"){
	  			var sex=2;
	  		}else{
	  			var sex=0;
	  		}
	  		
	  		var birthday=$(".birthday").val();
	  		var national=$(".national").val();
	  		var idaddress=$(".idaddress").val();
	  		var localaddress=$(".localaddress").val();
	  		var e=$(".political option:selected").val().trim();
	  		if(e=="党员"){
	  			var political=1;
	  		}else if(e=="预备党员"){
	  			var political=2;
	  		}else if(e=="民主党派"){
	  			var political=3;
	  		}else if(e=="团员"){
	  			var political=4;
	  		}else if(e=="群众"){
	  			var political=5;
	  		}else if(e=="其他"){
	  			var political=6;
	  		}else{
	  			var political=0;
	  		}
	  		
	  		var education=$(".education option:selected").val();
	  		var marriage=$(".marriage option:selected").val();
	  		var urgent=$(".urgent").val();
	  		var urgent_phone=$(".urgent_phone").val();
	  		var qq=$(".qq").val();
	  		var weixin=$(".weixin").val();
	  		var id=$(".geren").attr("abbr");//入职id
	  		var shpiren=$(".report-pic").attr("abbr");//审批人id，这里指人事部经理
	  		var shqiren=$(".report-pic").attr("ssb");//申请人id，这里指当前用户
	  		console.log(shpiren+"---"+shqiren);
	  		$.ajax({
	  			url:"hr-ruzhicommit",
	  			type:"post",
	  			data:{
	  				"shqiren":shqiren,
	  				"shpiren":shpiren,
	  				"id":id,
	  				"zhengjian":zhengjian,
	  				"position_id":position_id,
	  				"Depart_id":Depart_id,
	  				"phone":phone,
	  				"zhengjianhao":zhengjianhao,
	  				"staffType":staff_type,
	  				"dateentry":dateentry,
	  				"ht_type":ht_type,
	  				"ht_start":ht_start,
	  				"ht_end":ht_end,
	  				"ht_finish":ht_finish,
	  				"name":name,
	  				"sex":sex,
	  				"birthday":birthday,
	  				"national":national,
	  				"idaddress":idaddress,
	  				"localaddress":localaddress,
	  				"political":political,
	  				"education":education,
	  				"marriage":marriage,
	  				"urgent":urgent,
	  				"urgentPhone":urgent_phone,
	  				"qq":qq,
	  				"weixin":weixin
	  				},
	  			success:function(data){
	  				$("#content-admin").panel('open').panel('refresh','hr-induction');
	  			}
	  		});
	  	}
	  </script>
   
</body>
</html>